Skip to content

reimplement: SHC_3BB0A8C1_0x0044B840#148

Draft
TheRedDaemon wants to merge 3 commits into
mainfrom
reimpl/SHC_3BB0A8C1_0x0044B840
Draft

reimplement: SHC_3BB0A8C1_0x0044B840#148
TheRedDaemon wants to merge 3 commits into
mainfrom
reimpl/SHC_3BB0A8C1_0x0044B840

Conversation

@TheRedDaemon

@TheRedDaemon TheRedDaemon commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Not much fun with this one.
The code has a lot of freedom due to a lot of math.

Worse (?) though is an issue with reccmp: There are array accesses that reccmp does not understand, it seems, which match only if I produce the original address, others however want the reimplementation to match. This makes trying to reason about the parts that seem to fit and those that do not hard.
I send a message to their discord.

I would halt this for now, since it is in no state to be merged. I think there is still a lot to try, but I spend a good amount of time trying and failing to match another function completely recently and in this other case reccmp was behaving at least.
We should return later in the hope the tool can improve, unless someone wants a challenge.

@gynt: I received help from the reccmp dev. The issue is the space between the type and the array brackets. The pdb data has a space there, so our annotations need to replicated this:
int[...] -> int [...]

@TheRedDaemon TheRedDaemon added the in progress PR functions as reminder, input not needed yet. label Jul 8, 2026
@TheRedDaemon TheRedDaemon changed the title reimplement: SHC_3BB0A8C1_0x0044B840 in progress reimplement: SHC_3BB0A8C1_0x0044B840 Jul 8, 2026
@TheRedDaemon TheRedDaemon added declaration/type change This requires changes to the generated/exported types or definitions. halted Stopped and not good enough for the repo yet. and removed in progress PR functions as reminder, input not needed yet. labels Jul 9, 2026
@gynt

gynt commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

@TheRedDaemon Like so?

  // GLOBAL: STRONGHOLDCRUSADER 0x00B95B40
-// StructResolver::Instance<int[9],12147520>::instance
+// StructResolver::Instance<int [9],12147520>::instance

I tried to test but can't decide if this is wrong code or wrong comment notation by me

image
// GLOBAL: STRONGHOLDCRUSADER 0x00B98630
// StructResolver::Instance<int [10],12158512>::instance

namespace OpenSHC {

MACRO_STRUCT_RESOLVER(int[10], false, Address::SHC_3BB0A8C1_0x00B98630) DAT_CurrentPlayerUnitLossesHistory;
} // namespace OpenSHC

MACRO_STRUCT_INSTANCE(Address::SHC_3BB0A8C1_0x00B98630);

@gynt

gynt commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

See fcc95ee

@TheRedDaemon TheRedDaemon force-pushed the reimpl/SHC_3BB0A8C1_0x0044B840 branch from f60d04e to fe6e4b6 Compare July 14, 2026 18:49
@TheRedDaemon TheRedDaemon added in progress PR functions as reminder, input not needed yet. and removed declaration/type change This requires changes to the generated/exported types or definitions. halted Stopped and not good enough for the repo yet. labels Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in progress PR functions as reminder, input not needed yet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants